<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增供应商信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-supplier-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">供应商期数：</label>
                <div class="col-sm-8">
                    <input name="supplierNperId" class="form-control" type="hidden" th:value="${supplierNperId}">
                    <input class="form-control" type="text" id="title" name="title" readonly="true" th:value="${textValue}">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">供应商名称：</label>
                <div class="col-sm-8">
                    <input name="supplierName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">供应商法人姓名：</label>
                <div class="col-sm-8">
                    <input name="supplierPerson" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">法人手机：</label>
                <div class="col-sm-8">
                    <input name="supplierMoble" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">联系人：</label>
                <div class="col-sm-8">
                    <input name="inkman" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">联系人电话：</label>
                <div class="col-sm-8">
                    <input name="telephone" class="form-control" type="text">
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label">供应商地址：</label>
                <div class="col-sm-8">
                    <input name="address" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">供应商手机联系方式：</label>
                <div class="col-sm-8">
                    <input name="moble" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">开户行名称：</label>
                <div class="col-sm-8">
                    <input id="blankName" name="blankName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">开户行账号：</label>
                <div class="col-sm-8">
                    <input id="blankAccount" name="blankAccount" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">供应商账号：</label>
                <div class="col-sm-8">
                    <input id="account" name="account" class="form-control" type="text">
                </div>
            </div>


            <div class="form-group">
                <label class="col-sm-3 control-label is-required">登录密码：</label>
                <div class="col-sm-8">

                    <div class="input-group">
                        <input id="password" name="password" placeholder="请输入登录密码" class="form-control" type="password" th:value="${@config.getKey('sys.user.initPassword')}" required>
                        <span class="input-group-addon" title="登录密码,鼠标按下显示密码"
                              onmousedown="$('#password').attr('type','text')"
                              onmouseup="$('#password').attr('type','password')"><i class="fa fa-key"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/supplier"
        $("#form-supplier-add").validate({
            onkeyup: false,
            rules:{

                password:{
                    minlength: 5,
                    maxlength: 20
                },

            },
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-supplier-add').serialize());
            }
        }
    </script>
</body>
</html>